using ASP;
using HoWave.Common;
using HoWave.Data;
using HoWave.Data.Bll;
using HoWave.Web.Admin;
using System;
using System.Data;
using System.Web.Profile;
using System.Web.SessionState;
using System.Web.UI.WebControls;
public class Admin_MBF_VipCardCategoryManage : Admin, IRequiresSessionState
{
	private UserCardCategory bllCategory = UserCardCategory.instance;
	protected TextBox txtKeywords;
	protected Button Button_Search;
	protected Repeater Repeater_CompareSet;
	protected DefaultProfile Profile
	{
		get
		{
			return (DefaultProfile)this.Context.Profile;
		}
	}
	protected global_asax ApplicationInstance
	{
		get
		{
			return (global_asax)this.Context.ApplicationInstance;
		}
	}
	protected void Page_Load(object sender, EventArgs e)
	{
		if (!base.IsPostBack)
		{
			try
			{
				if (!base.admin.CheckAdminPower(38))
				{
					base.WriteLog("Modidy", Language.GetAdminMsg("Log/Access", "0"), "MBF_VipCardCategoryManage");
					base.WriteRightErrMsg();
				}
				this.BindData();
			}
			catch (Exception ex)
			{
				MessageBox.Show(this, "数据加载失败！\n" + ex.Message);
			}
		}
	}
	protected void Button_Search_Click(object sender, EventArgs e)
	{
		string str = this.txtKeywords.Text.Trim();
		base.Response.Redirect("MBF_VipCardCategoryManage.aspx?MenuID=5&MenuName=网站&FileName=VIP卡类别管理&keywords=" + str);
	}
	protected void BindData()
	{
		string text = Fetch.Get("keywords");
		string text2 = " ";
		if (text != "")
		{
			this.txtKeywords.Text = text;
			text2 = text2 + " CardCategoryName like '%" + text + "%'";
		}
		DataTable dataSource = this.bllCategory.GetListRowid(2147483647, text2, "rowid asc").Tables[0];
		this.Repeater_CompareSet.DataSource = dataSource;
		this.Repeater_CompareSet.DataBind();
	}
	protected string GetDel(object obj)
	{
		return string.Format("\"{0}\"", obj);
	}
}
